Skip to content

Conversation

@dmandar
Copy link
Collaborator

@dmandar dmandar commented Feb 6, 2026

Description

This PR introduces Regex Validation for the TextField component and standardizes the
MultipleChoice
component styling mechanism.

Key Changes
Regex Validation (TextField):
Added validationRegexp property to the TextField schema in both v0.8 (
standard_catalog_definition.json
) and v0.9 (
standard_catalog.json
).
Implemented client-side validation logic in the Lit renderer (text-field.ts). The field now validates input against the provided regex pattern and displays an error state if the pattern does not match.
Updates the input to leverage the native HTML pattern attribute for accessibility and built-in validation support.
Added a "TextField (Regex)" example to the Component Gallery sample to demonstrate functionality.
Standardization (
MultipleChoice
):
Removed the non-standard displayStyle property from the
MultipleChoice
renderer.
Standardized on the variant property (values: "checkbox" | "chips") to control the visual presentation, aligning the renderer with the specification.
Refactored hardcoded colors in
MultipleChoice
to use the CSS variable var(--md-sys-color-secondary-container-high) for better theming support.
Sample Updates:
Updated the Component Gallery theme to define the new
MultipleChoice
hover color variable locally, ensuring the sample looks correct without polluting the core shell theme.

Pre-launch Checklist

  • [ X] I signed the CLA.
  • [ X] I read the Contributors Guide.
  • [ X] I read the Style Guide.
  • [X ] I have added updates to the CHANGELOG.
  • [X ] I updated/added relevant documentation.
  • [ X] My code changes (if any) have tests.

If you need help, consider asking for advice on the discussion board.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This is a substantial pull request that adds regex validation to text fields, enhances the MultipleChoice component with chip and filterable layouts, and introduces a comprehensive component gallery sample. The new features are well-implemented and the gallery is a valuable addition for demonstration and testing. My review includes suggestions to improve code maintainability, robustness, and style consistency in a few areas, such as simplifying redundant logic, refactoring hardcoded values, and making agent-side dispatching more robust.

Copy link
Collaborator

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a rubber stamp: I'm not reviewing the web code, since that's not my specialty.

@jacobsimionato jacobsimionato requested a review from ditman February 6, 2026 04:53
@ditman
Copy link
Collaborator

ditman commented Feb 6, 2026

Also, please remember to fill in the PR description template! It's useful when looking back at what has landed. Just the title is not enough information, at the very least this needs a description and to be linked to an issue on the repo!

@dmandar dmandar merged commit c1397f8 into main Feb 7, 2026
11 checks passed
@dmandar dmandar deleted the md-textregex branch February 7, 2026 01:05
@github-project-automation github-project-automation bot moved this from Todo to Done in A2UI Feb 7, 2026
nan-yu added a commit to nan-yu/A2UI that referenced this pull request Feb 10, 2026
google#605 accidentally broke the
v0.9/standard_catalog.json. This commit fixes the invalid JSON schema
and reformats it.
@nan-yu nan-yu mentioned this pull request Feb 10, 2026
6 tasks
cbaueratwork pushed a commit to cbaueratwork/A2UI-test-gmp that referenced this pull request Feb 10, 2026
* fix contact sample

* Fix dropdown and make it multi-choice

* Add a new component_gallery sample agent and client that allows debugging on-the-wire a2UI JSON and actions

* Update samples/client/lit/component_gallery/README.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fix modal

* Create new  0.8.2 version of the spec to support filtering and types for dropdown

* Add regex for textfield in lit.

* Simplify diff by reverting unrelated changes to icon.ts and checkbox.ts

* review fixes

* fix review comments

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants